#ifndef CIRCLETIMEPROGRESS_H
#define CIRCLETIMEPROGRESS_H

#include <QtGui/QColor>
#include <QtGui/QImage>
#include <QtGui/QPainter>
#include <QtGui/QPainterPath>

#include <QtQuick/QQuickPaintedItem>

/*!
 * \brief The CircleTimeProgress class
 */
class CircleTimeProgress : public QQuickPaintedItem
{
    Q_OBJECT

    Q_PROPERTY (int depth READ depth WRITE setDepth NOTIFY depthChanged)
    Q_PROPERTY (QColor color READ color WRITE setColor NOTIFY colorChanged)
    Q_PROPERTY (QColor borderColor READ borderColor WRITE setBorderColor NOTIFY borderColorChanged)
    Q_PROPERTY (int step READ step WRITE setStep NOTIFY stepChanged)
    Q_PROPERTY (int period READ period WRITE setPeriod NOTIFY periodChanged)
    Q_PROPERTY (int clocs READ clocs WRITE setClocs NOTIFY clocsChanged)

public:

    explicit CircleTimeProgress(QQuickItem *parent = 0);
    
    virtual void paint(QPainter *painter);

    int depth () const;
    void setDepth (int depth);

    QColor color () const;
    void setColor (const QColor& color);

    int period () const;
    void setPeriod (int period);

    int step () const;
    void setStep (int step);

    int clocs () const;
    void setClocs (int clocs);

    QColor borderColor () const;
    void setBorderColor (const QColor& color);

signals:

    void depthChanged ();
    void colorChanged ();
    void stepChanged ();
    void periodChanged ();
    void clocsChanged ();
    void borderColorChanged ();

private:

    int m_depth;
    QColor m_color;
    QColor m_borderColor;
    int m_step;
    int m_period;
    int m_clocs;
    QImage m_plot;
};

#endif // CIRCLETIMEPROGRESS_H
